package org.imdm.portal.loadchecker.telnet;

public class UnameCommand extends Command {

	public UnameCommand(TelnetClientAdvance telnet) {
		super(telnet);
	}

	public String execute() throws TelnetException {
		StringBuffer _buf = new StringBuffer(""); 
		String unamei = sendCommand("uname -i");
		if ( unamei != null ) {
			_buf.append("Hardware = " + unamei.substring(0, unamei.lastIndexOf("\n")).trim() + "\n");
		}
		String unamex = sendCommand("uname -X");
		if ( unamex != null ) {
			_buf.append(unamex.substring(0, unamex.lastIndexOf("\n")).trim());
		}
		return _buf.toString();
	}
}
